#include <nlohmann/json.hpp>
#include <iostream>
#include <fstream>
using namespace std;

int main(){
    
    ifstream ifs("info.json");
    char * buf = new char[121]{0};
    ifs.read(buf, 120);//读取文件内容，全部读出来
    nlohmann::json json = nlohmann::json::parse(buf); // parse就是反序列化
    json["key3"]["key5"] = 5678;

    cout << json.dump() << "\n";

    delete[] buf;

    return 0;
}